﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Htinns.GatewayConsole.Models
{
	public class Vote : ModelBase
	{
		public int Id { get; set; }		

		public string Title { get; set; }

		public int MaxSelect { get; set; } //max can select item ，one radio | multiple checkbox

		public virtual ICollection<VoteItem> VoteItems { get; set; }

		//public virtual ICollection<VoteSheet> VoteSheets { get; set; }
	}

	public class VoteItem : ModelBase
	{		
		public int Id { get; set; }	

		public string Content { get; set; }

		public virtual Vote Vote { get; set; }

		public virtual ICollection<VoteSheet> VoteSheets { get; set; }

		[NotMapped]
		public double Percent { get; set; }//需重新加载

		
	}
	
	public class VoteSheet : ModelBase
	{
		public int Id { get; set; }

		public string HotelId { get; set; }

		public string RoomNo { get; set; }
		
		public string Description { get; set; }

		public virtual Vote Vote { get; set; }

		public virtual ICollection<VoteItem> VoteItems { get; set; }

	}

}